#ifndef LIB_UTILS_UI_USERICONLABEL_H
#define LIB_UTILS_UI_USERICONLABEL_H

#include "../utils_global.h"
#include <QLabel>
#include <QMenu>
namespace TWUtils {
namespace UI {

	class TWUTILS_EXPORT UserIconLabelInfo
	{
		public:
			enum ActionType
			{
				MailAction = 0,
				ReplyAction,
				WebsiteAction
			};

			virtual QString actionText(ActionType) = 0;
			virtual bool isActionEnabled(ActionType) = 0;
	};

	class TWUTILS_EXPORT UserIconLabel : public QLabel
	{
		Q_OBJECT
		public:
			UserIconLabel(UserIconLabelInfo* info,QWidget* p = 0);
		signals:
			void actionInvoked(int);





		protected:
			void contextMenuEvent(QContextMenuEvent*);
		private:
			static QMenu*	M_Menu;
			static QAction*	M_MailAct;
			static QAction*	M_ReplyAct;
			static QAction*	M_ViewWebAct;
			UserIconLabelInfo* info;
	};
}
}
#endif // USERICONLABEL_H
